<template>
	<view class="nav-bar">
		<view :style="{height:statusBarHeight+'px'}"></view>
		<uni-nav-bar left-icon="left" background-color="#3274F9" color="#fff" @clickLeft="back" :title="title" :border="false" fixed="true"></uni-nav-bar>
	</view>
</template>

<script>
	import { useUserStore } from '../../store/userStore';
	export default {
		data() {
			return {
				title:'',
				id:1
			};
		},
		onLoad(op) {
			this.id = op.id
			if(this.id == 1){
				this.title = '服务协议'
			}else{
				this.title = '隐私协议'
			}
		},
		computed:{
			statusBarHeight(){
				return useUserStore().statusBarHeight
			}
		},
		methods:{
			back(){
				uni.navigateBack()
			}
		}
	}
</script>

<style lang="scss">

</style>
